#!/bin/bash
########### timing to mq script #############
function schedule_startup() {
	crt_num=`ps -ef | grep "python3" | grep "$2" | wc -l`
	unstartup=`expr $1 - $crt_num`
	while(($unstartup > 0))
	do
		nohup python3 -m $2 2>&1 &
		let "unstartup--"
	done
}
########## start worker ##############
schedule_startup 5 apps.autotest.mq.report
schedule_startup 1 apps.autotest.mq.cache
schedule_startup 1 apps.autotest.mq.disconnect_device
